package com.cn.tous.resource.controller;

import com.alibaba.nacos.api.model.v2.Result;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mengwei
 * @description AdminController
 * @createDate 2025/7/26 16:33
 */
@RestController
@RequestMapping("/admin")
//@PreAuthorize("hasRole('ADMIN')")
public class AdminController {


    @GetMapping("/dashboard")
    public Result<?> getDashboardData() {
        return Result.success("管理员控制台数据");
    }

    @GetMapping("/users")
    public Result<?> getAllUsers() {
        return Result.success("系统用户列表");
    }

    @GetMapping("/settings")
    public Result<?> systemSettings(Authentication authentication) {
        return Result.success("系统设置 - 操作人: " + authentication.getName());
    }
}
